package part1.api.collection.collectiontest;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;

public class CollectionToArray {
    public static void main(String[] args) {
        Collection<String> c1 = new ArrayList<>();
        c1.add("one");
        c1.add("two");
        c1.add("four");
        c1.add("five");

        String[] array = c1.toArray(new String[4]);
        System.out.println(Arrays.toString(array));

    }
}
